package com.scm.service;

import com.scm.dao.CustomerMapper;
import com.scm.pojo.Customer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @ClassName CustomerService
 * @Description TODO
 * @Author Xu
 * @Date 2021/7/14 9:17
 * @Version 1.0
 **/
@Service
public class CustomerService implements CustomerMapper {
    @Autowired
    private CustomerMapper customerMapper;

    @Override
    public void addCustomer(Customer customer) {
        customerMapper.addCustomer(customer);
    }

    @Override
    public List<Customer> getPageCustomer(Map<String, Object> map) {
        return customerMapper.getPageCustomer(map);
    }

    @Override
    public int count() {
        return customerMapper.count();
    }

    @Override
    public void deleteCustomer(String customerCode) {
        customerMapper.deleteCustomer(customerCode);
    }

    @Override
    public Customer findCustomer(String customerCode) {
        return customerMapper.findCustomer(customerCode);
    }

    @Override
    public void updateCustomer(Customer customer) {
        customerMapper.updateCustomer(customer);
    }

    @Override
    public List<String> getAllCustomerCode() {
        return customerMapper.getAllCustomerCode();
    }

    @Override
    public List<Customer> getCustomer() {
        return customerMapper.getCustomer();
    }

    @Override
    public String getCustomerName(String customerCode) {
        return customerMapper.getCustomerName(customerCode);
    }

    @Override
    public List<Customer> selectCustomer(Map<String, Object> map) {
        return customerMapper.selectCustomer(map);
    }

    @Override
    public int selectCountCustomer(Map<String, Object> map) {
        return customerMapper.selectCountCustomer(map);
    }
}
